#include <locale.h>
#include <stdio.h>
#include <wchar.h>

int main(int argc, char *argv[])
{
	char *locale;
	wchar_t s[10] = {0};
	locale = setlocale(LC_ALL, NULL);
	printf("locale : %s\n", locale);
	locale = setlocale(LC_ALL, "zh_CN.utf8");
	s[0] = L'中';
	printf("locale : %s\n", locale);
	printf("s : %ls\n", s);
	
	locale = setlocale(LC_ALL, "zh_CN.gb2312");
	s[0] = '中';
	printf("locale : %s\n", locale);
	printf("s : %ls\n", s); //can not output 中

	return 0;
}
